<?php
	
	$errorMessage = "";

	if(empty($_POST['methode'])) 
        {
			$errorMessage .= "<li>Leeg veld</li>";
		}
		
	$methode = $_POST['methode'];
		
	mysql_connect ("localhost", "root", "") or die('');
	mysql_select_db ("PIzzacat");
	
	if(empty($errorMessage)){ 	
		$query = "INSERT INTO verzendmethode (Id, methode) VALUES ('NULL', '".$methode."')";

		mysql_query($query) or die('Error Updating');

		echo "Database Updates with: " .$methode ;
	}

?>

<html>
<body>

<?php
		if(!empty($errorMessage)){
				echo("<ul>" . $errorMessage ."</ul>");
			}	
?>
<br />
<br />
<a href="toevoeg.php" alt="">Terug</a>
</body>
</html>